package com.aijk.web.admin.h5.controller;


import com.aijk.ehm.api.OptContentApi;
import com.aijk.ehm.model.OptContent;
import com.aijk.web.admin.controller.BaseController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;


@Controller
@RequestMapping("/h5/protocol")
public class ProtocolH5Controiller extends BaseController {

    @Autowired
    private OptContentApi optContentApi;


    @RequestMapping(value = "/info", method = RequestMethod.GET)
    public String list_view1(Model model , Integer type) {
        //绑定协议
        Long id = null;
        if(type == 1){
            id = (long)1;
            //关于我们
        }else if(type == 2){
            id = (long)8;
        }
        OptContent optContent = optContentApi.findOne(id);
        model.addAttribute("content" , optContent.getBody());
        return "h5/protocol/info";
    }

}
